package com.yohann.order_service.service;

import com.yohann.order_service.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yohann.order_service.entity.vo.OrderVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author Yohann
 * @since 2020-11-09
 */
public interface OrdersService extends IService<Orders> {

    /**
     * 查询订单信息
     *
     * @param current
     * @param limit
     * @param order
     * @return
     */
    Map<String, Object> queryOrder(int current, int limit, Orders order);

    /**
     * 获取订单信息
     *
     * @param id
     * @return
     */
    OrderVo getOrderInfo(String id);

    /**
     * 获取用户的所有订单
     *
     * @param id
     * @return
     */
    List<OrderVo> getUserOrder(int id);

    /**
     * 获取购买情况
     */
    boolean getPurchaseStatus(int userId, int courseId);

    void pay(Orders order);
}
